package com.example.springbootmybatis.SingletonDesignModel;

import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

@ToString
@Slf4j
public class UnSafeSingleton {
    private UnSafeSingleton(){}

    private UnSafeSingleton unSafeSingleton;

    public UnSafeSingleton getInstance(){
        unSafeSingleton = new UnSafeSingleton();
        return unSafeSingleton;
    }

    public void doSomething(){
        log.info(unSafeSingleton.toString());
    }
}
